home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / info / rtnews / rtnv2n6 < prev    next >
Encoding:
Text File  |  1994-10-16  |  28.0 KB  |  617 lines

  1.  
  2.  _ __                 ______                         _ __
  3. ' )  )                  /                           ' )  )
  4.  /--' __.  __  ,     --/ __  __.  _. o ____  _,      /  / _  , , , _
  5. /  \_(_/|_/ (_/_    (_/ / (_(_/|_(__<_/ / <_(_)_    /  (_</_(_(_/_/_)_
  6.              /                               /|
  7.             '                               |/
  8.  
  9.             "Light Makes Right"
  10.  
  11.             September 20, 1989
  12.                 Volume 2, Number 6
  13.  
  14. Compiled by Eric Haines, 3D/Eye Inc, 2359 Triphammer Rd, Ithaca, NY 14850
  15.     NOTE ADDRESS CHANGE: wrath.cs.cornell.edu!eye!erich
  16.     [distributed by Michael Cohen <m-cohen@cs.utah.edu>, but send
  17.     contributions and subscriptions requests to Eric Haines]
  18. All contents are US copyright (c) 1989 by the individual authors
  19. Archive location: anonymous FTP at cs.uoregon.edu (128.223.4.1), /pub/RTNews
  20.  
  21. Contents:
  22.     Introduction
  23.     New People and Address Changes
  24.     Q&A on Radiosity Using Ray Tracing, Mark VandeWettering & John Wallace
  25.     Dark Bulbs, by Eric Haines
  26.     MTV Ray Tracer Update and Bugfix, by Mark VandeWettering
  27.     DBW Ray Tracer Description
  28.     ======== USENET cullings follow ========
  29.     Wanted: Easy ray/torus intersection, by Jochen Schwarze
  30.     Polygon to Patch NFF Filter, by Didier Badouel
  31.     Texture Mapping Resources, by Eric Haines, Prem Subrahmanyam,
  32.     Ranjit Bhatnagar, and Jack Ritter
  33.  
  34. -------------------------------------------------------------------------------
  35.  
  36. Introduction
  37.  
  38.     There are a lot of new people, with some interesting fields of study.
  39. There's been a lot of talk about texture mapping and the DBW ray tracer on the
  40. net.  This discussion will probably continue into next issue, but I felt Jack
  41. Ritter's posting a good way to end it for now.  I've also been toying with
  42. texturing again, making my version of "Mount Mandrillbrot" (fractal mountain
  43. with everyone's favorite beasty textured onto it), which some clever person
  44. invented at the University of Waterloo (I think) some years ago (does anyone
  45. know who?).  There are also other useful snippets throughout.
  46.  
  47.     However, one major reason that I'm flushing the queue right now is
  48. that the node "hpfcrs" is disappearing off the face of the earth.  So, please
  49. note my only valid address is the "wrath" path at the top of the issue.
  50. Thanks!
  51.  
  52. -------------------------------------------------------------------------------
  53.  
  54. New People and Address Changes
  55.  
  56.  
  57. Panu Rekola, pre@cs.hut.fi
  58.  
  59. To update my personal information in your files:
  60.  
  61. Surface mail:    Panu Rekola
  62.         Mannerheimintie 69 A 7
  63.         SF-00250 Helsinki, Finland
  64. Phone:        +358-0-4513243 (work), +358-0-413082 (home)
  65. Email:        pre@cs.hut.fi
  66. Interests:    illumination models, texture mapping, parametric surfaces.
  67.  
  68. You may remove one of the names you may have in the contact list.  Dr. Markku
  69. Tamminen died in the U.S.  when he was returning home from SIGGRAPH.  How his
  70. project will go on, is still somewhat unclear.
  71.  
  72. --------
  73.  
  74. Andrew Pearce, pearce@alias
  75.  
  76. I wrote my MS thesis on Multiprocessor Ray Tracing, then moved to Alias where
  77. I sped up Mike Sweeney's ray caster.  I've just completed writing the Alias
  78. Ray Tracer using a recursive uniform subdivision method (see Dave Jevans paper
  79. in Graphics Interface '89, "Adaptive Voxel Subdivision for Ray Tracing") with
  80. additional bounding box and triangle intersection speed ups.
  81.  
  82. Right now, I'm fooling around with using the guts of the ray tracer to do
  83. particle/object collision detection with complex environments, and
  84. particle/particle interaction with the search space reduced by the spatial
  85. subdivision.  (No, I don't use the ray tracer to render the particles.)
  86.  
  87. In response to Susan Spach's question about mip mapping, we use mip maps for
  88. our textures, we get the sample size by using a "cone" size parameter which is
  89. based on the field of view, aspect ratio, distance to the surface and angle of
  90. incidence.  For secondary rays this size parameter is modified based on the
  91. tangents to the surface and the type of secondary ray it is (reflection or
  92. refraction).  This may be difficult to do if you are not ray tracing surfaces
  93. for which the tangent information is readily available (smooth shaded
  94. polygonal meshes?).
  95.  
  96. - Andrew Pearce
  97. - Alias Research Inc., Toronto, Ontario, Canada.
  98. - pearce%alias@csri.utoronto.ca   |   pearce@alias.UUCP
  99. - ...{allegra,ihnp4,watmath!utai}!utcsri!alias!pearce
  100.  
  101. --------
  102.  
  103. Brian Corrie, bcorrie@uvicctr.uvic.ca
  104.  
  105.     I am a graduate student at the University of Victoria, nearing the
  106. completion of my Masters degree.  The topic of my thesis is producing
  107. realistic computer generated images in a distributed network environment.
  108. This consists of two major research areas:  providing a distributed (in the
  109. parallel computing sense) system for ray tracing, as well as a workbench for
  110. scene description, and image manipulation.  The problems that need to be
  111. addressed by a system for parallel processing in a distributed loosely coupled
  112. system are quite different than those addressed by a tightly coupled parallel
  113. processor system.  Because of the (likely) very high cost of communication in
  114. a distributed processing environment, most parallel algorithms currently used
  115. are not feasible (due to the high overhead).  The gains of parallel ray
  116. tracing in a distributed environment are:  the obvious speedup by bringing
  117. more processing power to bear on the problem, the flexibility of distributed
  118. systems, and the availability of the resources that will become accessible as
  119. distributed systems become more prominent in the computer community.
  120.  
  121.     Whew, what a mouthful.  In a nutshell, I am interested in:  ray
  122. tracing in general, parallel algorithms, distributed systems for image
  123. synthesis (any one know of any good references), and this new fangled
  124. radiosity stuff.
  125.  
  126. --------
  127.  
  128. Joe Cychosz
  129.  
  130.     Purdue University CADLAB
  131.     Potter Engineering Center
  132.     W. Lafayette, IN  47906
  133.  
  134.     Phone: 317-494-5944
  135.     Email: cychosz@ecn.purdue.edu
  136.  
  137. My interests are in supercomputing and computer graphics.  Research work is
  138. Vectorized Ray Tracing.  Other interests are:  Ray tracing on MIMD tightly
  139. coupled shared memory machines, Algorithm vectorization, Mechanical design
  140. processes, Music synthesis, and Rendering in general.
  141.  
  142. --------
  143.  
  144. Jerry Quinn
  145. Department of Math and Computer Science
  146. Bradley Hall
  147. Dartmouth College
  148. Hanover, NH 03755
  149. sunapee.dartmouth.edu!quinn
  150.  
  151. My interests are currently ray tracing efficiency, parallelism,
  152. animation, radiosity, and whatever else happens to catch my eye at the
  153. given moment.
  154.  
  155. --------
  156.  
  157. Marty Barrett - octrees, parametric surfaces, parallelism.
  158.     mlb6@psuvm.bitnet
  159.  
  160. Here is some info about my interests in ray tracing:
  161.  
  162. I'm interested in efficient storage structures for ray tracing, including
  163. octree representations and hybrid regular subdivision/octree grids.  I've
  164. looked at ray tracing of parametric surfaces, in particular Bezier patches and
  165. box spline surfaces, via triangular tessellations.  Parallel implementations of
  166. ray tracing are also of interest to me.
  167.  
  168. --------
  169.  
  170.     Charles A. Clinton
  171.     Sierra Geophysics, Inc.
  172.     11255 Kirkland Way
  173.     Kirkland, WA 98033 USA
  174.     Email: ...!uw-beaver!sumax!ole!steven!cac
  175.     Voice: (206) 822-5200 
  176.     Telex: 5106016171
  177.     FAX:   (206) 827-3893
  178.  
  179. I am doing scientific visualization of 3D seismic data. To see the kind of
  180. work that I am doing, check out:
  181.  
  182.     'A Rendering Algorithm for Visualizing 3D Scaler Fields'
  183.     Paolo Sabella
  184.     Schlumberger-Doll Research
  185.     Computer Graphics, Vol. 22, Number 4 (SIGGRAPH '88 Conference Proc.)
  186.     pp 51-58
  187.  
  188. In addition, I try to keep up with ray-tracing and computer graphics in
  189. general. I occasionally try my hand at doing some artistic ray-tracing.
  190. (I would like to extend my thanks to Mark VandeWettering for distributing
  191. MTV. It has provided a wonderful platform for experimentation.)
  192.  
  193. --------
  194.  
  195. Jochen Schwarze
  196.  
  197.    I've been developing several smaller graphics packages, e.g.  a 3D
  198. visualization of turning parts etc.  Now I'm implementing the 2nd version of a
  199. ray tracing program that supports modular programming using a description
  200. language, C++ vector analysis and body class hierarchy, CSG trees, texture
  201. functions and mapping, a set of body primitives, including typeface rendering
  202. for logos, and a network ipc component to allow several cpu's to calculate a
  203. single image.
  204.  
  205.    My interests lie - of course :-) - in speedup techniques, and the
  206. simulation of natural phenomena, clouds, water, etc.  Just starting with this.
  207.  
  208. Jochen Schwarze                     Domain: schwarze@isaak.isa.de
  209. ISA GmbH, Stuttgart, West Germany   UUCP:   schwarze@isaak.uucp
  210.                                     Bang:   ...!uunet!unido!isaak!schwarze
  211.  
  212.                     S-Mail: ISA GmbH
  213.                         c/o Jochen Schwarze
  214.                         Azenberstr. 35
  215.                         7000 Stuttgart 1
  216.                         West Germany
  217.  
  218. -------------------------------------------------------------------------------
  219.  
  220. Q&A on Radiosity Using Ray Tracing, Mark VandeWettering & John Wallace
  221.  
  222.  
  223. >From Mark VandeWettering:
  224.  
  225. I am currently working on rewriting my ray tracer to employ radiosity-like 
  226. effects.  Your paper (with Wallace and Elmquist) is very nice, and suggests
  227. a really straightforward implementation.  I just have a couple of questions 
  228. that you might be able to answer.
  229.  
  230. When you shoot energy from a source patch, it is collected at a specific
  231. patch vertex.  How does this energy get transferred to a given patch for 
  232. secondary shooting?  In particular, is the vertex shared between multiple
  233. patches, or is each vertex only in a single patch?  I can imagine the
  234. solution if each vertex is distinct, but have trouble with the case where
  235. vertices are shared.  Any quick insights?
  236.  
  237. The only other question I have is:  HOW DO YOU GET SUCH NICE MODELS TO RENDER?
  238. [We use ME30, HP's Romulus based solids modeler - EAH]
  239.  
  240. Is there a public domain modeling package that is available for suns or sgi's 
  241. that I can use to make more sophisticated models?  Something cheap even?
  242.  
  243. [The BRL modeler and ray tracer runs on a large number of machines, and they
  244. like having universities as users - see Vol.2 No.2 (archive 6).  According
  245. to Mike Muuss' write-up, some department in Princeton already has a copy.
  246.  
  247. The Simple Surface Modeler (SSM) works on SGI equipment.  It was developed at
  248. the Johnson Space Center and, since they are not supposed to make any money
  249. off it, is being sold cheap (?) by a commercial distributor.  COSMIC, at
  250. 404-542-3265, can send you some information on it.  It also runs on a Pixel
  251. Machine (which is what I saw it running on at SIGGRAPH 88), though I don't
  252. believe support for this machine will be shipped.  It's evidentally not
  253. shipping yet (red tape - the product is done), but should be "realsoonnow".
  254. More information when I get the abstract.  Does anyone else know any
  255. resources?]
  256.  
  257. --------
  258.  
  259. Reply from John Wallace:
  260.  
  261. Computing the patch energy in progressive radiosity using ray tracing:
  262.  
  263. Following a step of progressive radiosity, every mesh vertex in the scene will
  264. have a radiosity.  Energy is not actually collected at the mesh vertices.
  265. What is computed at each vertex is the energy per unit area (radiosity)
  266. leaving the surface at that location.  The patch radiosity is the average
  267. energy per unit area over the patch.  Finally, the patch energy is the patch
  268. radiosity times the patch area (energy per unit area times area).
  269.  
  270. The vertex radiosities can be considered a sampling of the energy per unit
  271. area at selected points across the patch.  To obtain the average energy per
  272. unit area over the patch, take the average of the vertex radiosities.  This
  273. assumes that the vertices represent uniform sub-areas of the patch.  This is
  274. not necessarily true, and when it is not a more accurate answer is obtained by
  275. taking an area weighted average of the vertex radiosity.  The weight given to
  276. a vertex is equal to the area of the patch that it represents.  In our work we
  277. used a uniform mesh and weighted all vertices equally.
  278.  
  279. It doesn't matter whether vertices are shared by neighboring patches, since
  280. we're talking about energy per unit area.  Picture four patches that happen to
  281. all share a particular vertex.  The energy per unit area leaving any of the
  282. patches at the vertex is not affected by the fact that other patches share
  283. that vertex.  If we were somehow collecting energy at the vertex, then it
  284. would have to be portioned out between the patches.
  285.  
  286. Once the patch radiosity is know, the patch energy is obtained by multiplying
  287. patch radiosity times patch area.
  288.  
  289. -------------------------------------------------------------------------------
  290.  
  291. Dark Bulbs, by Eric Haines
  292.  
  293.     An interesting idea mentioned to me by Andrew Glassner was the concept
  294. of "darkbulbs" in computer graphics.  This idea is a classic joke technology,
  295. in which the darkbulb sucks light out of an area.  For example, if you want
  296. to sleep during the daytime, you simply turn on your negative 100 watt dark
  297. bulb and your bedroom is flooded in darkness.  Andrew noted that this
  298. technology is entirely viable in computer graphics, and would even be useful
  299. in obtaining interesting results.
  300.  
  301.     I happened to mention the idea to Roy Hall, and he told me that this
  302. was an undocumented feature of the Wavefront package!  Last year Wavefront came
  303. out with an image of two pieces of pottery behind a candle, with wonderful
  304. texturing on the objects.  It turns out that the artist had wanted to
  305. tone down the brightness in some parts of the image, and so tried negative
  306. intensity light sources.  This turned out to work just fine, and the artist
  307. mentioned this to Roy, who, as an implementer of this part of the package,
  308. had never considered that anyone would try this and so never restricted the
  309. intensity values to be non-negative.
  310.  
  311. -------------------------------------------------------------------------------
  312.  
  313. MTV Ray Tracer Update and Bugfix, by Mark VandeWettering
  314.  
  315.  
  316. [this was extracted by me from personal mail, with parts appearing on
  317. comp.graphics - EAH]
  318.  
  319. As was recently pointed out to me by Mike Schoenborn, the cylinder code in the
  320. version of the MTV raytracer is broken somewhat severely.  Or at least it
  321. appeared to be so, what actually happens is that I forgot to normalize two
  322. vectors, which leads to interesting distortions and weird looking cylinders.
  323. Anyway, the bug is in cone.c, in the function MakeCone().  After the vectors
  324. cd -> cone_u and cd -> cone_v are created, they should be normalized.  A
  325. context diff follows at the end of this.  This makes the SPD "tree" look MUCH
  326. better.  (And all this time I thought it was Eric's fault :-)
  327.  
  328. This bugfix will be worked into the next release, and I should also update the
  329. version on cs.uoregon.edu SOMETIME REAL SOON NOW (read, don't hold your breath
  330. TOO anxiously).  Hope that this program continues to be of use...  :-)
  331.  
  332. Somebody has some texture mapping code that they are sending me, I will
  333. probably try to integrate it in before I make my next release.  I am also
  334. trying to get in spline surfaces, but am having difficulty to the point of
  335. frustration.Any recommendations on implementing them?
  336.  
  337.  
  338. *** ../tmp/cone.c    Fri Aug 25 20:25:52 1989
  339. --- cone.c    Fri Aug 25 21:31:04 1989
  340. ***************
  341. *** 240,247 ****
  342. --- 240,251 ----
  343.       /* find two axes which are at right angles to cone_w
  344.        */
  345.   
  346.       VecCross(cd -> cone_w, tmp, cd -> cone_u) ;
  347.       VecCross(cd -> cone_u, cd -> cone_w, cd -> cone_v) ;
  348. +     VecNormalize(cd -> cone_u) ;
  349. +     VecNormalize(cd -> cone_v) ;
  350.   
  351.       cd -> cone_min_d = VecDot(cd -> cone_w, cd -> cone_base) ;
  352.       cd -> cone_max_d = VecDot(cd -> cone_w, cd -> cone_apex) ;
  353.  
  354. -------------------------------------------------------------------------------
  355.  
  356. DBW Ray Tracer Description
  357.  
  358. [A ray tracer that has been mentioned in these pages (screens?) before is DBW.
  359. Not having an Amiga and not being able to deal with "zoo" files, I never got a
  360. copy.  Prem Subrahmanyam has now made it available via anonymous FTP from
  361. geomag.gly.fsu.edu in /pub/pics/DBW.src.  Output is four bits for each
  362. channel.
  363.  
  364. The original program was written by David B. Wecker, translating from a Vax
  365. 11/750 to the Amiga, with a conversion to Sun workstations by Ofer Licht
  366. (ofer@gandalf.berkeley.edu). - EAH]
  367.  
  368. Below is an excerpt from the documentation RAY.DOC:
  369.  
  370.  
  371. The RAY program knows how to create images composed of four primitive
  372. geometric objects:  spheres, parallelograms, triangles, and flat circular
  373. rings (disks with holes in them).  Some of the features of the program are:
  374.  
  375. Diffuse and specular reflections (with arbitrary levels of gloss or polish).
  376. Rudimentary modeling of object-to-object diffusely reflected light is also
  377. implemented, that among other things accurately simulates color bleed effects
  378. from adjacent contrasting colored objects.
  379.  
  380. Mirror reflections, including varying levels of mirror smoothness or
  381. perfection.
  382.  
  383. Refraction and translucency (which is akin to variable microscopic smoothness,
  384. like the surface of etched glass).
  385.  
  386. Two types of light sources:  purely directional (parallel rays from infinity)
  387. of constant intensity, and spherical sources (like light bulbs, which cast
  388. penumbral shadows as a function of radius and distance) where intensity is
  389. determined by the inverse square law.
  390.  
  391. Photographic depth-of-field.  That is, the virtual camera may be focused on a
  392. particular object in the scene, and the virtual camera's aperture can be
  393. manipulated to affect the sharpness of foreground and background objects.
  394.  
  395. Solid texturing.  Normally, a particular object (say a sphere) is considered
  396. to have constant properties (like color) over the entire surface of the
  397. object, often resulting in fake looking objects.  Solid texturing is a way to
  398. algorithmically change the surface properties of an object (thus the entire
  399. surface area is no longer of constant nature) to try and model some real world
  400. material.  Currently the program has built in rules for modelling wood,
  401. marble, bricks, snow covered scenes, water (with arbitrary wave sources), plus
  402. more abstract things like color blend functions.
  403.  
  404. Fractals.  The program implements what's known as recursive triangle
  405. subdivision, which creates all manners of natural looking surface shapes (like
  406. broken rock, mountains, etc.).  The character of the fractal surface (degree
  407. of detail, roughness, etc.)  is controlled by parameters fed to the program.
  408.  
  409. AI heuristics to complete computation of a scene within a user specified
  410. length of time.  [???]
  411.  
  412. ======== USENET cullings follow ===============================================
  413.  
  414. Wanted: Easy ray/torus intersection, by Jochen Schwarze
  415.  
  416.  
  417. What I want to do is to turn a path consisting of line and arc segments around
  418. an axis and then ray-trace the generated turning part.  The rotated line
  419. segments produce cylinders or cones that are easy to intersect with a ray,
  420. whereas the arcs produce tori.  To evaluate the intersection of the ray with a
  421. torus I'd have to numerically solve a polynomial equation of fourth degree.
  422.  
  423. Does anybody know a way that avoids solving a general fourth- degree equation?
  424. Perhaps something that respects torus geometry and allows to split the
  425. equation into two quadric ones?  Any other fast way to do it?
  426.  
  427. Thanks very much.
  428.  
  429. Jochen Schwarze                     Domain: schwarze@isaak.isa.de
  430. ISA GmbH, Stuttgart, West Germany   UUCP:   schwarze@isaak.uucp
  431.                                     Bang:   ...!uunet!unido!isaak!schwarze
  432.  
  433. -------------------------------------------------------------------------------
  434.  
  435. Polygon to Patch NFF Filter, by Didier Badouel
  436.  
  437.  
  438. This is a new filter program for NFF databases, it  converts polygons (p)
  439. into patches (pp) computing normal vector for vertices. 
  440.  
  441. ________________________________________________________________
  442.   Didier  BADOUEL                   badouel@irisa.fr
  443.   INRIA / IRISA                Phone : +33 99 36 20 00
  444.  Campus Universitaire de Beaulieu    Fax :   99 38 38 32
  445.  35042 RENNES CEDEX - FRANCE        Telex : UNIRISA 950 473F
  446. ________________________________________________________________
  447.  
  448. [Code removed.  Find it at cs.uoregon.edu or write him - EAH]
  449.  
  450. -------------------------------------------------------------------------------
  451.  
  452. Texture Mapping Resources, by Eric Haines, Prem Subrahmanyam,
  453.     Ranjit Bhatnagar, and Jack Ritter
  454.  
  455.  
  456. >From: Eric Haines
  457.  
  458. Robert Minsk had a question about how to do inverse mapping on a quadrilateral.
  459. This was my response:
  460.  
  461. For the inverse bilinear mapping of XYZ to UV, see p. 59-64 of "An Introduction
  462. to Ray Tracing", edited by Andrew Glassner, Academic Press (hot off the press).
  463. Tell me if you find any bugs, since I need to send typoes to AP.  This same
  464. info is in the "Intro to RT" SIGGRAPH course notes from 1987 & 1988,
  465. with one important typo fixed (see old issues of the Ray Tracing News to
  466. find out the typo).
  467.  
  468. An excellent discussion of the most popular mappings (affine, bilinear, and
  469. projective), and for a discussion on why to avoid simple Gouraud interpolation,
  470. get a copy of Paul Heckbert's Master's Thesis (again, hot off the press),
  471. "Fundamentals of Texture Mapping and Image Warping".  It's got what you need
  472. and is also a good start on sampling/filtering problems.  Order it as
  473. Report No. UCB/CSD 89/516 (June 1989) from
  474.  
  475.         Computer Science Division
  476.         Dept of Electrical Engineering and Computer Sciences
  477.         University of California
  478.         Berkeley, California  94720
  479.  
  480. It was $5.50 when I ordered mine.  Oh, I should also note: it has source
  481. code in C for most of the algorithms described in the text.
  482.  
  483. --------
  484.  
  485. >From: prem@geomag.fsu.edu (Prem Subrahmanyam)
  486. Newsgroups: comp.graphics
  487. Subject: Re: Texture mapping
  488. Organization: Florida State University Computing Center
  489.  
  490. I would strongly recommend obtaining copies of both DBW_Render and QRT, as
  491. both have very good texture mapping routines.  DBW uses absolute spatial
  492. coordinates to determine texture, while QRT uses a relative position per each
  493. object type mapping.  DBW has some really interesting features, like
  494. sinusoidal reflection to simulate waves, a turbulence-based marble/wood
  495. texture based on the wave sources defined for the scene.  It as well has a
  496. brick texture, checkerboard, and mottling (turbulent variance of the color
  497. intensity).  Writing a texture routine in DBW is quite simple, since you're
  498. provided with a host of tools (like a turbulence function, noise function,
  499. color blending, etc.).  I have recently created a random-color texture that
  500. uses the turbulence to redefine the base color based on the spatial point
  501. given, which it then blends into the object's base color using the color blend
  502. routines.  Next will be a turbulent-color marble texture that will modify the
  503. marble vein coloring according to the turbulent color.  Also in the works are
  504. random color checkerboarding (this will require a little more thought),
  505. variant brick height and mortar color (presently they are hard-wired), the
  506. list is almost endless.  I would think the ideal ray-tracer would be one that
  507. used QRT's user-definable texture patches which are then mapped onto the
  508. object, as well as DBW's turbulence/wave based routines.  The latter would
  509. have to be absolute coordinate based, while the former can use QRT's relative
  510. position functions.  In any case, getting copies of both of these would be the
  511. most convenient, as there's no reason to reinvent the wheel.
  512.  
  513. --------
  514.  
  515. >From: ranjit@grad1.cis.upenn.edu (Ranjit Bhatnagar)
  516.     4211 Pine St., Phila PA 19104
  517. Newsgroups: comp.graphics
  518. Subject: Re: Texture mapping by spatial position
  519. Organization: University of Pennsylvania
  520.  
  521. The combination of 3-d spatial texture-mapping (where the map for a particular
  522. point is determined by its position in space rather than its position on the
  523. patch or polygon) with a nice 3-d turbulence function can give really neat
  524. results for marble, wood, and such.  Because the texture is 3-d, objects look
  525. like they are carved out of the texture function rather than veneered with it.
  526. It works well with non-turbulent texture functions too, like bricks, 3-d
  527. checkerboards, waves, and so on.  However, there's a disadvantage to this kind
  528. of texture function that I haven't seen discussed before:  as generally
  529. proposed, it's highly unsuited to _animation._ The problem is that you
  530. generally define one texture function throughout all of space.  If an object
  531. happens to move, its texture changes accordingly.  It's a neat effect - try it
  532. - but it's not what one usually wants to see.
  533.  
  534. The obvious solution to this is to define a separate 3-d texture for each
  535. object, and, further, _cause the texture to be rotated, translated, and scaled
  536. with the object._ DBW does not allow this, so if you want to do animations of
  537. any real complexity with DBW, you can't use the nice wood or marble textures.
  538.  
  539. This almost solves the problem.  However, it doesn't handle the case of an
  540. object whose shape changes.  Consider a sphere that metamorphoses into a cube,
  541. or a human figure which walks, bends, and so on.  There's no way to keep the
  542. 3-d texture function consistent in such a case.
  543.  
  544. Actually, the real world has a similar defect, so to speak.  If you carve a
  545. statue out of wood and then bend its limbs around, the grain of the wood will
  546. be distorted.  If you want to simulate the real world in this way and get
  547. animated objects whose textures stay consistent as they change shape, you have
  548. to use ordinary surface-mapped (2-d) textures.  But 3-d textures are so much
  549. nicer for wood, stone, and such!  There are a couple of ways to get the best
  550. of both worlds:  [I assume that an object's surface is defined as a constant
  551. set of patches, whether polygonal or smooth, and though the control points may
  552. be moved around, the topology of the patches that make up the object never
  553. changes, and patches are neither added to or deleted from the object during
  554. the animation.]
  555.  
  556.     1) define the base-shape of your object, and _sample its surface_ in
  557.        the 3-d texture.  You can then use these sample tables as ordinary
  558.        2-d texture maps for the animation.
  559.  
  560.     2) define the base-shape of your object, and for each metamorphosized
  561.        shape, keep pointers to the original shape.  Then, whenever a ray
  562.        strikes a point on the surface of the metamorphed shape, find the
  563.        corresponding point on the original shape and look up its
  564.        properties (i.e.  color, etc.)  in the 3-d texture map.  [Note:  I
  565.        use ray-tracing terminology but the same trick should be applicable
  566.        to other techniques.]
  567.  
  568. The first technique is perhaps simpler, and does not require you to modify
  569. your favorite renderer which supports 2-d surface texture maps.  You just
  570. write a preprocessor which generates 2-d maps from the 3-d texture and the
  571. base-shape of the object.  However, it is susceptible to really nasty aliasing
  572. and loss of information.  The second technique has to be built into the
  573. renderer, but is amenable to all the antialiasing techniques possible in an
  574. ordinary renderer with 3-d textures, such as DBW.  Since the notion of 'the
  575. same point' on a particular patch when the control points have moved is
  576. well-defined except in degenerate cases, the mapping shouldn't be a problem --
  577. though it does add an extra level of antialiasing to worry about.  [Why?
  578. Imagine that a patch which is very large in the original base-shape has become
  579. very small - sub-pixel size - in the current animated shape.  Then a single
  580. pixel-sized sample in the current shape could be mapped to a large part of the
  581. original - using, for instance, stochastic sampling or analytic techniques.]
  582.  
  583. If anyone actually implements these ideas, I'd like to hear from you (and get
  584. credit, heh heh, if I thought of it first).  I doubt that I will have the
  585. opportunity to try it.
  586.  
  587. --------
  588.  
  589. >From: ritter@versatc.UUCP (Jack Ritter)
  590. Organization: Versatec, Santa Clara, Ca. 95051
  591.  
  592. [Commenting on Ranjit's posting]
  593.  
  594. It seems to me that you could solve this problem by transforming the
  595. center/orientation of the texture function along with the object that is being
  596. instantiated.  No need to store values, no tables, etc.  The texture function
  597. must of course be simple enough to be so transformable.
  598.  
  599. Example, wood grain simulated by concentric cylindrical shells around an axis
  600. (the core of the log):
  601.  
  602.     Imagine the log's center line as a half-line vector, (plus a position, if
  603. necessary), making it transformable.  Imagine each object type in its object
  604. space, BOLTED to the log by an invisible bracket.  As you translate and rotate
  605. the object, you also sling the log around.  But be careful, some of these logs
  606. are heavy, and might break your teapots.  I use only natural logs myself.
  607.  
  608.    Jack Ritter, S/W Eng. Versatec, 2710 Walsh Av, Santa Clara, CA 95051
  609.    Mail Stop 1-7.  (408)982-4332, or (408)988-2800 X 5743
  610.    UUCP:  {ames,apple,sun,pyramid}!versatc!ritter
  611.  
  612. -------------------------------------------------------------------------------
  613. END OF RTNEWS
  614.  
  615.